LEGION Simulator Help

Principles of advanced filtering

Advanced filtering uses statements and three Boolean operators: AND, OR, NOT. Discrete statements must be contained within square brackets and connected by one of the following binary operators (listed here in increasing order of priority):

  • OR - broadens a filter so that it contains any of the linked statements.
  • AND - narrows a filter so that it contains only the linked statements.

In addition the operator NOT can be placed before any statement to exclude its findings from the filter.

Statements can be nested within curved brackets to ensure they are processed in the correct order, thereby providing accurate results. Nested statements work in the same manner as mathematical equations that include parentheses. Terms inside the parentheses are searched first, then terms outside the parentheses are added to the search (see the third example below).

Examples of filters

Here are four possible filters:

  • [Activity = "On Escalator"]
    • This will single out all Entities in the model using escalators at a particular moment.
  • [Activity = "On Escalator"] And [Frustration > 10.0]
    • This will single out all Entities in the model using escalators and experiencing Frustration greater than 10.0 at a particular moment.
  • [Target = "Exit #002"]AndNot ([Activity = "On Escalator"] Or [Activity = "On Stairs"])
    • This will single out all Entities in the model at a particular moment which are targeted to Exit #002, excluding those using escalators or stairs.
  • [Target = "Exit #002"] And ([Activity = "On Escalator"] Or [Activity = "On Stairs"])
    • This will filter for all Entities using escalators or stairs that are targeted to Exit #002.

If you were to omit the curved brackets from the fourth example, the filter would return all Entities targeted to Exit #002 that are using stairs as well as ALL Entities that are using escalators, regardless of their target.